package com.atguigu.gulimall.coupon;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;


/**
 * 1) 引入依赖
 * 2）创建一个bootstrap.properties(配置中心的地址+应用名)
 *    spring.application.name=gulimalll-coupon
 *    spring.cloud.nacos.config.server-addr=127.0.0.1:8848
 * 3) 需要给配置中心默认添加一个叫 数据集（Data Id）gulimall-coupon.properties。默认规则：应用名.properties
 * 4) 给 "应用名.properties"添加配置
 * 5）动态获取配置
 *    @RefreshScope + @Value
 *
 */
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallCouponApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallCouponApplication.class, args);
    }

}
